package com.vector.demo.exception;


import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;


/**
 * 全局异常处理类
 */
/**
 * 自定义 HandlerExceptionResolver 对象处理异常
 * 必须要实现 HandlerExceptionResolver
 */
@ControllerAdvice
public class GlobalExceptionHandler {
    @ExceptionHandler(org.thymeleaf.exceptions.TemplateInputException.class)
    @ResponseBody
    public Object myTemplateInputException() {
            return "您访问的页面正忙，请稍后再来访问";
    }

}